package com.tangk.tool.author.dict;

import com.tangk.tool.author.core.Utils;
import com.tangk.tool.util.Constans;
import com.tangk.tool.util.IntUtil;

public class TimeDict implements IDict<StringBuilder>{
	/**
	 * 一月：正月、孟春、寅月、首春、元阳、初月、开岁、初春、
	 *二月：仲春、卯月、仲月、杏月、丽月、花朝
	 *三月：季春、辰月、暮春、杪春、桃月、蚕月、
	 *四月：孟夏、巳月、清和、槐序、槐月、麦月、麦秋、
	 *五月：仲夏、午月、蒲月、榴月、中夏
	 *六月：季夏、未月、暑月、荷月、暮夏、
	 *七月：孟秋、申月、巧月、首秋、初秋、兰月、瓜月、凉月
	 *八月；仲月、酉月、中秋、正秋、桂月、爽月
	 *九月：季秋、戍月、暮秋、菊序、霜序、菊月、咏月
	 *十月：孟冬、亥月、初冬、良月、阳月、开冬
	 *十一月：仲冬、中冬、子月、畅月、复月、龙潜、雪月、冬月、大吕、
	 *十二月：季冬、丑月、严冬、嘉平、暮平、临月、腊月、风杪、残冬、冰月、岁暮
	 */
	public static Object[] month = {
			new String[]{"正月","孟春","寅月","首春","元阳","初月","开岁","初春"},
			new String[]{"仲春","卯月","仲月","杏月","丽月","花朝"},
			new String[]{"季春","辰月","暮春","杪春","桃月","蚕月"},
			new String[]{"孟夏","巳月","清和","槐序","槐月","麦月","麦秋"},
			new String[]{"仲夏","午月","蒲月","榴月","中夏"},
			new String[]{"季夏","未月","暑月","荷月","暮夏"},
			new String[]{"孟秋","申月","巧月","首秋","初秋","兰月","瓜月","凉月"},
			new String[]{"仲月","酉月","中秋","正秋","桂月","爽月"},
			new String[]{"季秋","戍月","暮秋","菊序","霜序","菊月","咏月"},
			new String[]{"孟冬","亥月","初冬","良月","阳月","开冬"},
			new String[]{"仲冬","中冬","子月","畅月","复月","龙潜","雪月","冬月","大吕"},
			new String[]{"季冬","丑月","严冬","嘉平","暮平","临月","腊月","风杪","残冬","冰月","岁暮"},
	};
	
	
	public StringBuilder getRandom(StringBuilder defaultValue){
		StringBuilder rst = new StringBuilder();
		Integer year = IntUtil.RandomIntBetween(1, 10000); 
		rst.append(getContry());
		rst.append(year+"年");
		rst.append(getRandomMonth());
		rst.append(Constans.ENTER);
		return Utils.returnResult(rst, defaultValue);
	}
	
	public String getContry(){
		String[] guojia = {"公元前","罗马历"};
		Integer contry = IntUtil.RandomIntBetween(0, guojia.length);
		return guojia[contry];
	}
	public String getRandomMonth(){
		int r1 = IntUtil.RandomIntBetween(0, month.length);
		String[] monthDay = (String[]) month[r1];
		int r2 = IntUtil.RandomIntBetween(0, monthDay.length);
		return monthDay[r2];
	}
	
}
